package com.platform.modules.mall.activity.restrict;

import com.alibaba.fastjson.JSONObject;
import com.platform.modules.mall.activity.entity.bo.ActivityGoshoppingBo;
import com.platform.modules.mall.entity.MallActivityEntity;
import com.platform.modules.mall.entity.MallWhitelistEntity;
import org.springframework.stereotype.Component;


/**
 * 无限制规则，可以自由购买，不限制数量，不限制白名单，单次领取限制100个
 */
@Component("noRestrictVerify")
public class NoRestrictVerify extends RestrictAbstract {

    @Override
    public boolean verify(ActivityGoshoppingBo activityGoshoppingBo, MallActivityEntity mallActivityEntity) {
        return true;
    }

    @Override
    public Integer getNumber(ActivityGoshoppingBo activityGoshoppingBo, MallActivityEntity mallActivityEntity) {
        return 100;
    }

    @Override
    public boolean successAfter(ActivityGoshoppingBo activityGoshoppingBo) {
        return true;
    }

    @Override
    public JSONObject getDataJson(ActivityGoshoppingBo activityGoshoppingBo, MallActivityEntity mallActivityEntity) {
        JSONObject object =new JSONObject();
        object.put("level","");
        object.put("number",100);
        return object;
    }

}
